package com.pagepub.core.utils;

import java.util.ResourceBundle;

public class SystemUtil {
	/**
	 * ��ȡ�����Ҫ����Դ�ļ�����(Ĭ��)
	 * @param keyName
	 * @return
	 */
	public static String getFrameworkDefaultResourceValue(String keyName)
	{
		try
		{
			ResourceBundle rb=ResourceBundle.getBundle(SystemCfgHelper.getDefaultResource());
			return rb.getString(keyName);
		}
		catch(Exception e)
		{			
			return "";
		}
	}
	/**
	 * ��ȡ�����Ҫ����Դ�ļ�����
	 * @param keyName
	 * @param resourceName ��Դ�ļ���ƣ�����Ҫ��·����

	 * @return
	 */
	public static String getFrameworkResourceValue(String keyName,String resourceName)
	{
		try
		{
			ResourceBundle rb=ResourceBundle.getBundle(SystemCfgHelper.getResource()+"."+resourceName);
			return rb.getString(keyName);
		}
		catch(Exception e)
		{			
			return "";
		}
	}
}
